package com.Entity;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Users entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "users", catalog = "monitor")
public class Users implements java.io.Serializable {

	// Fields

	private Integer userId;
	private short userType;
	private short userAccountStatus;
	private String userName;
	private String password;
	private String passwordMd5;
	private String privateEmail;
	private String nickName;
	private Timestamp lastActivityTime;
	private Integer rank;
	private Integer loginTimes;
	private String loginUserShowName;
	private Integer deviceId;
	private Integer communityId;

	// Constructors

	/** default constructor */
	public Users() {
	}

	/** full constructor */
	public Users(short userType, short userAccountStatus, String userName,
			String password, String passwordMd5, String privateEmail,
			String nickName, Timestamp lastActivityTime, Integer rank,
			Integer loginTimes, String loginUserShowName, Integer deviceId,
			Integer communityId) {
		this.userType = userType;
		this.userAccountStatus = userAccountStatus;
		this.userName = userName;
		this.password = password;
		this.passwordMd5 = passwordMd5;
		this.privateEmail = privateEmail;
		this.nickName = nickName;
		this.lastActivityTime = lastActivityTime;
		this.rank = rank;
		this.loginTimes = loginTimes;
		this.loginUserShowName = loginUserShowName;
		this.deviceId = deviceId;
		this.communityId = communityId;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "UserID", unique = true, nullable = false)
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "UserType")
	public short getUserType() {
		return this.userType;
	}

	public void setUserType(short userType) {
		this.userType = userType;
	}

	@Column(name = "UserAccountStatus")
	public short getUserAccountStatus() {
		return this.userAccountStatus;
	}

	public void setUserAccountStatus(short userAccountStatus) {
		this.userAccountStatus = userAccountStatus;
	}

	@Column(name = "UserName", length = 64)
	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "Password", length = 128)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "PasswordMD5")
	public String getPasswordMd5() {
		return this.passwordMd5;
	}

	public void setPasswordMd5(String passwordMd5) {
		this.passwordMd5 = passwordMd5;
	}

	@Column(name = "PrivateEmail", length = 64)
	public String getPrivateEmail() {
		return this.privateEmail;
	}

	public void setPrivateEmail(String privateEmail) {
		this.privateEmail = privateEmail;
	}

	@Column(name = "NickName", length = 64)
	public String getNickName() {
		return this.nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	@Column(name = "LastActivityTime", length = 19)
	public Timestamp getLastActivityTime() {
		return this.lastActivityTime;
	}

	public void setLastActivityTime(Timestamp lastActivityTime) {
		this.lastActivityTime = lastActivityTime;
	}

	@Column(name = "Rank")
	public Integer getRank() {
		return this.rank;
	}

	public void setRank(Integer rank) {
		this.rank = rank;
	}

	@Column(name = "LoginTimes")
	public Integer getLoginTimes() {
		return this.loginTimes;
	}

	public void setLoginTimes(Integer loginTimes) {
		this.loginTimes = loginTimes;
	}

	@Column(name = "LoginUserShowName", length = 200)
	public String getLoginUserShowName() {
		return this.loginUserShowName;
	}

	public void setLoginUserShowName(String loginUserShowName) {
		this.loginUserShowName = loginUserShowName;
	}

	@Column(name = "DeviceID")
	public Integer getDeviceId() {
		return this.deviceId;
	}

	public void setDeviceId(Integer deviceId) {
		this.deviceId = deviceId;
	}

	@Column(name = "CommunityID")
	public Integer getCommunityId() {
		return this.communityId;
	}

	public void setCommunityId(Integer communityId) {
		this.communityId = communityId;
	}

}